<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns="http://www.w3.org/1999/xhtml" version="2.1">
	<jsp:directive.page contentType="text/html; charset=UTF-8" />
	<jsp:directive.page isELIgnored="false" />
	<jsp:output omit-xml-declaration="false" doctype-root-element="HTML"
		doctype-system="about:legacy-compat" />
<html>
<head>

<link rel="shortcut icon" href="${pageContext.request.contextPath }/img/favicon.png" />

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<title>Ikex</title>

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/estilos.css"
	type="text/css" media="screen" charset="utf-8" />

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/menuLateral.css"
	type="text/css" media="screen" charset="utf-8" />



<meta name="description" content="" />
<meta name="author" content="Emilio Javier Castillo Gonzalez" />

<script type="text/javascript" language="javascript" src="${pageContext.request.contextPath }/js/cookies/verCookies.js">
<!-- a -->
</script>

<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath }/js/login/login.js">
<!-- a -->
</script>
</head>


<body>
<jsp:useBean id="productos"	class="es.ikex.beans.ListaTipoProductosBean" scope="session" /> 
<c:if test="${param.codigo != null and param.codigo != '' }">
<jsp:setProperty name="productos" property="clausulaWhere" value="where codigo='${param.codigo }'"/>
</c:if>

	<c:import url="${pageContext.request.pathInfo}/jsp/menuLateral.jsp" />
	<div id="contenedor">
		<c:import url="${pageContext.request.pathInfo}/jsp/cabecera.jsp" />

		<div id="contenido">
			
			<div id="centro">
				<c:forEach items="${productos.where }" var="producto">
					<div style="border: 1px solid #DFDFDF; margin: 15px; width: 90%; border-radius: 25px;">
						<div style="width: 36%; float:left; margin: 2%">
							<div style="border-bottom: 1px;">
							<img alt="foto-mueble" src="${pageContext.request.contextPath }/img/muebles/${param.foto}" style="max-width: 450px; max-height: 450px"/>
							</div>
							<p>${producto.concepto }
							<br />
							<form action="${pageContext.request.contextPath }/procesarMueble" method="post">
								<input type="hidden" name="categoria" value="${param.categoria }" />
								<input type="hidden" name="coleccion" value="${param.coleccion }" />
								<input type="hidden" name="producto" value="${param.codigo }" />
								<label for="cantidad">Cantidad</label>
								<input type="number" required="required" min="1" name="cantidad" id="cantidad" value="1" /> 
								<c:if test="${clienteBean.tipoAcceso == null || clienteBean.tipoAcceso == 'UsuarioRegistrado' }">
									<input type="submit" name="comprar" value="Comprar" />
								</c:if>
								
							</form>
							<h3 style="color:red;">${param.error }</h3><br />
							 ${producto.precio }€
							 </p>
						</div>
						<div style="width: 56%; float: left; margin: 2%">
							${producto.descripcion }
						</div>
						<div style="clear: both;"><!-- A --></div>
					</div>
				</c:forEach>
				
			</div>

			<div id="der" style="clear: both;"></div>
		</div>
	</div>

</body>
</html>
</jsp:root>